﻿@{ 

    string user_manager = "";
    string user_info = "";
    string tiezi = "";
    string xiaoxi = "";
    if (Model == "user_manager")
    {
        user_manager = "layui-this";
    }
    else if (Model == "user_info")
    {
        user_info = "layui-this";
    }
    else if (Model == "tie_zi")
    {
        tiezi = "layui-this";
    }
    else if (Model == "xiao_xi")
    {
        xiaoxi = "layui-this";
    }
}

    <div class="layui-row">
        <ul class="layui-nav layui-nav-tree layui-inline" lay-filter="user" style="width: 180px;height:680px;">
          
            <li class="layui-nav-item @user_manager"> <a href="/User/User_Manager"> <i class="layui-icon"></i> 用户中心 </a> </li>
            <li class="layui-nav-item @user_info"> <a href="/User/User_Info"> <i class="layui-icon"></i> 基本设置 </a> </li>
            <li class="layui-nav-item @tiezi"> <a href="/User/Tie_Zi"> <i class="layui-icon">&#xe60a;</i> 我的帖子 </a> </li>
            <li class="layui-nav-item @xiaoxi"> <a href="/User/Xiao_Xi"> <i class="layui-icon"></i> 我的消息 </a> </li>
        </ul>
    </div>


<script>

        var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块

        //监听导航点击
        element.on('nav(demo)', function (elem) {
            //console.log(elem)
            layer.msg(elem.text());
        });

</script>